package com.samp.solr.hanlp.syntax;

import com.hankcs.hanlp.corpus.dependency.CoNll.CoNLLSentence;
import com.hankcs.hanlp.dependency.MaxEntDependencyParser;

/**
 * 最大熵句法分析器
 */
public class MaxEntDemo {
    private static void demo(String msg){
        MaxEntDependencyParser parser = new MaxEntDependencyParser();
        CoNLLSentence sentence = parser.parse(msg);
        System.out.println(sentence);

    }

    public static void main(String[] args) {
        long start = System.currentTimeMillis();
        try{
            String msg = "徐先生还具体帮助他确定了把画雄鹰、松鼠和麻雀作为主攻目标。";
            msg = "华盛顿州副州长Cyrus Habib热情欢迎了王东华总领事一行，他对中美企业在华盛顿州展开合作充满期待，";
            demo(msg);
        }catch (Exception e){
            e.printStackTrace();
        }
        System.out.println("cost:"+(System.currentTimeMillis()-start));
    }
}
